#include "movie.h"


movie::movie()
{
	author = "";
	length = -1;
}

movie::movie(string name, string author, int year, int length) : multimedia(name, year){
	this->author = author;
	this->length = length;
}


movie::~movie()
{
}

ostream & operator<< (ostream &o, movie &m){
	o << "movie;" << m.name << "; " << m.author << "; " << m.year << "; " << m.length;
	return o;
}

istream & operator>> (istream &i, movie &m){
	getline(i, m.name, ';');
	getline(i, m.author, ';');
	i >> m.year;
	i.get();
	i >> m.length;
	i.get();
	return i;
}